﻿using BCEntity.Sim.Company.CompanyBusinessType;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace BCData.Sim.Company.CompanyBusinessType
{
    /// <summary>
    /// 公司业务类型
    /// </summary>
	public interface ICompanyBusinessTypeData
    {
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="companyBusinessTypeId">公司业务类型Id</param>
        Task<bool> Exists(int companyBusinessTypeId);
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="companyBusinessTypeCode">公司业务类型编码</param>
        Task<bool> Exists(string companyBusinessTypeCode);
        /// <summary>
        /// 增加公司业务类型
        /// </summary>
        /// <param name="entity">公司业务类型信息</param>
        Task<CompanyBusinessTypeEntity> Add(CompanyBusinessTypeEntity entity);
        /// <summary>
        /// 更新公司业务类型
        /// </summary>
        /// <param name="entity">公司业务类型信息</param>
        Task<CompanyBusinessTypeEntity> Update(CompanyBusinessTypeEntity entity);
        /// <summary>
        /// 删除公司业务类型
        /// </summary>
        /// <param name="companyBusinessTypeId">公司业务类型Id</param>
        Task<bool> Delete(int companyBusinessTypeId);
        /// <summary>
        /// 获取公司业务类型
        /// </summary>
        /// <param name="companyBusinessTypeId">公司业务类型Id</param>
        Task<CompanyBusinessTypeEntity> GetEntity(int companyBusinessTypeId);
        /// <summary>
        /// 获取公司业务类型
        /// </summary>
        /// <param name="companyBusinessTypeCode">公司业务类型编码</param>
        Task<CompanyBusinessTypeEntity> GetEntity(string companyBusinessTypeCode);
        /// <summary>
        /// 获取公司业务类型列表
        /// </summary>
        Task<IEnumerable<CompanyBusinessTypeEntity>> GetList();
        /// <summary>
        /// 获取公司业务类型分页列表
        /// </summary>
        /// <param name="companyBusinessTypeCode">公司业务类型名称</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">公司业务类型每页数据条数</param>
        Task<(IEnumerable<CompanyBusinessTypeEntity>, int)> Query(string companyBusinessTypeCode, DateTime? start, DateTime? end, int pageIndex, int pageSize);
        #endregion  成员方法
    }
}
